#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QPushButton>
#include <QtMultimedia/QMediaPlayer>
#include <QMediaPlaylist>

namespace Ui {
class Widget;
}

class Widget : public QWidget
{
  Q_OBJECT

public:
explicit Widget(QWidget *parent = nullptr);
~Widget();

private:
  Ui::Widget *ui;

  QMediaPlayer player;  //音乐播放器
  QMediaPlaylist tap; //播放列表

  QWidget p2;
  QPushButton p2_p1;
  QPushButton p2_p2;
  QPushButton p2_p3;

  int mouse_flag=0;
  int mouse_x;
  int mouse_y;
  //鼠标按下
  void mousePressEvent(QMouseEvent *ev);
  //鼠标释放
  void mouseReleaseEvent(QMouseEvent *ev);
  //鼠标移动
  void mouseMoveEvent(QMouseEvent *ev);
  //绘图
  void paintEvent(QPaintEvent *e);

public slots:
  void bo();
};

#endif // WIDGET_H
